from tkinter import Tk
from tkinter.filedialog import askdirectory

# 创建Tkinter窗口
root = Tk()
root.withdraw()

# 弹出文件夹选择窗口
folder_path = askdirectory()

# 打印选择的文件夹路径
print(folder_path)